class Person {
  String name = "张三";
  int age = 18;

  // Person(String name , int age){
  //   this.age = age;
  //   this.name = name;
  // }

  void getPersonInfo() {
    print("姓名:${this.name},年龄:${this.age}");
  }

  void setPersonInfo(String name, int age) {
    this.name = name;
    this.age = age;
  }
}

void main() {
  var p1 = new Person();
  print(p1.name);
  print(p1.age);
  p1.getPersonInfo();

  p1.setPersonInfo("李四", 20);
  p1.getPersonInfo();


}
